#include "TwApplicationPCH.h"
#include "TwMaterialManager.h"
#include "TwDefines.h"

TwImplementSingleton(TwMaterialManager);

TwMaterialManager::TwMaterialManager()
{

}

TwMaterialManager::~TwMaterialManager()
{
	for (TwMaterialIterator iter = mMtlList.begin(); iter != mMtlList.end(); ++iter)
	{
		TwSafeDelete(*iter);
	}
}

void TwMaterialManager::addMtl(TwMaterial* mtl)
{
	mMtlList.push_back(mtl);
}

void TwMaterialManager::addMtlList(TwMaterialList& list)
{
	mMtlList.insert(mMtlList.end(), list.begin(), list.end());
}